package com.lxg.service.impl;

import com.lxg.dao.BookDao;
import com.lxg.service.BookService;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author 陆小根
 * date: 2022/04/23
 * Description:
 */
@Service
public class BookServiceImpl implements BookService {

  private BookDao bookDao;


  public void setBookDao(BookDao bookDao) {
    this.bookDao = bookDao;
  }

  @PostConstruct
  public void init() {
    System.out.println("init ....");
  }

  @Override
  public void save() {
    System.out.println("bookService save...");
    bookDao.save();
  }

  @PreDestroy
  public void destroy() {
    System.out.println("destroy ....");
  }

}
